import { BaseEntity } from '@cool-midway/core';
import { Column, Entity } from 'typeorm';

/**
 * 用户
 */
@Entity('app_user')
export class UserEntity extends BaseEntity {
    @Column({ comment: '头像' })
    avatar: string;

    @Column({ comment: '昵称' })
    nickname: string;

    @Column({ comment: '姓名', nullable: true })
    name: string;

    @Column({ comment: '性别 0:未知 1:男 2:女', default: 0, type: 'tinyint' })
    sex: number;

    @Column({ comment: '身份证', nullable: true })
    idCard: string

    @Column({ comment: '民族', nullable: true })
    nation: string;

    @Column({ comment: '生日', type: 'date', nullable: true })
    birthday: string;

    @Column({ comment: '手机', length: 20, nullable: true })
    mobile: string;

    @Column({ comment: '学校', nullable: true })
    schoolId: number;

    @Column({ comment: '学院', nullable: true })
    college: string;

    @Column({ comment: '专业', nullable: true })
    major: string;

    @Column({ comment: '班级', nullable: true })
    class: string;

    @Column({ comment: '学号', nullable: true })
    username: string;

    @Column({ comment: '密码', nullable: true })
    password: string;

    @Column({ comment: '会员', type: 'datetime', nullable: true })
    expire: string;

    @Column({ comment: '提醒 0:关闭 1:开启', default: 0, type: 'tinyint' })
    remind: number;

    @Column({ comment: '唯一标识', nullable: true })
    openid: string;

    @Column({ comment: '状态 0:禁用 1：启用', default: 1, type: 'tinyint' })
    status: number;
}
